/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * WorkerSearchForm.java
 *
 * Created on 01/12/2009, 15:07:53
 */

package sigbar.view;

/**
 *
 * @author Hudson
 */
public class WorkerSearchForm extends javax.swing.JPanel {

    /** Creates new form WorkerSearchForm */
    public WorkerSearchForm() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        titleLabel = new javax.swing.JLabel();
        nomeLabel = new javax.swing.JLabel();
        nome = new javax.swing.JTextField();
        cpfLabel = new javax.swing.JLabel();
        cpf = new javax.swing.JTextField();
        loginLabel = new javax.swing.JLabel();
        login = new javax.swing.JTextField();
        CargosLabel = new javax.swing.JLabel();
        garcomCheck = new javax.swing.JCheckBox();
        gerenteCheck = new javax.swing.JCheckBox();
        supervisorCheck = new javax.swing.JCheckBox();
        vendaCheck = new javax.swing.JCheckBox();
        submit = new javax.swing.JButton();
        clear = new javax.swing.JButton();
        resultpane = new javax.swing.JScrollPane();
        result = new javax.swing.JList();

        setLayout(new java.awt.GridBagLayout());

        titleLabel.setText("Parametros de Busca");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 8;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(titleLabel, gridBagConstraints);

        nomeLabel.setText("Nome:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(nomeLabel, gridBagConstraints);

        nome.setPreferredSize(new java.awt.Dimension(100, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(nome, gridBagConstraints);

        cpfLabel.setText("CPF:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(cpfLabel, gridBagConstraints);

        cpf.setPreferredSize(new java.awt.Dimension(100, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(cpf, gridBagConstraints);

        loginLabel.setText("Login:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(loginLabel, gridBagConstraints);

        login.setPreferredSize(new java.awt.Dimension(100, 20));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(login, gridBagConstraints);

        CargosLabel.setText("Cargos:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(CargosLabel, gridBagConstraints);

        garcomCheck.setText("Garçom");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(garcomCheck, gridBagConstraints);

        gerenteCheck.setText("Gerente");
        gerenteCheck.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenteCheckActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(gerenteCheck, gridBagConstraints);

        supervisorCheck.setText("Supervisor de Estoque");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(supervisorCheck, gridBagConstraints);

        vendaCheck.setText("Vendedor");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        add(vendaCheck, gridBagConstraints);

        submit.setText("Submeter");
        submit.setMaximumSize(new java.awt.Dimension(150, 150));
        submit.setMinimumSize(new java.awt.Dimension(100, 100));
        submit.setPreferredSize(new java.awt.Dimension(150, 100));
        submit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                submitMouseEntered(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
        add(submit, gridBagConstraints);

        clear.setText("Limpar");
        clear.setMaximumSize(new java.awt.Dimension(150, 150));
        clear.setMinimumSize(new java.awt.Dimension(100, 100));
        clear.setPreferredSize(new java.awt.Dimension(150, 100));
        clear.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                clearMouseEntered(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 22, 2, 2);
        add(clear, gridBagConstraints);

        resultpane.setMinimumSize(new java.awt.Dimension(100, 250));
        resultpane.setPreferredSize(new java.awt.Dimension(350, 250));

        result.setBorder(javax.swing.BorderFactory.createTitledBorder("Resultado da Busca"));
        result.setPreferredSize(new java.awt.Dimension(100, 300));
        resultpane.setViewportView(result);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 8;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 10;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        add(resultpane, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents

    private void gerenteCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenteCheckActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_gerenteCheckActionPerformed

    private void submitMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_submitMouseEntered
        GerenteForm ger = (GerenteForm) getParent().getParent();
        ger.setHelpText("Pesquisa o banco de dados, de acordo com as informações fornecidas.");
    }//GEN-LAST:event_submitMouseEntered

    private void clearMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clearMouseEntered
        GerenteForm ger = (GerenteForm) getParent().getParent();
        ger.setHelpText("Limpa o formulario rapidamente.");
    }//GEN-LAST:event_clearMouseEntered


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel CargosLabel;
    private javax.swing.JButton clear;
    private javax.swing.JTextField cpf;
    private javax.swing.JLabel cpfLabel;
    private javax.swing.JCheckBox garcomCheck;
    private javax.swing.JCheckBox gerenteCheck;
    private javax.swing.JTextField login;
    private javax.swing.JLabel loginLabel;
    private javax.swing.JTextField nome;
    private javax.swing.JLabel nomeLabel;
    private javax.swing.JList result;
    private javax.swing.JScrollPane resultpane;
    private javax.swing.JButton submit;
    private javax.swing.JCheckBox supervisorCheck;
    private javax.swing.JLabel titleLabel;
    private javax.swing.JCheckBox vendaCheck;
    // End of variables declaration//GEN-END:variables

}
